Reasoning with Style

نویسندگان

  • Martí Bosch
  • Pierre Genevès
  • Nabil Layaïda
چکیده

The Cascading Style Sheets (CSS) language constitutes a key component of web applications. It offers a series of sophisticated features to stylize web pages. Its apparent simplicity and power are however counter-balanced by the difficulty of debugging and maintaining style sheets, tasks for which developers still lack appropriate tools. In particular, significant portions of CSS code become either useless or redundant, and tend to accumulate over time. The situation becomes even worse as more complex features are added to the CSS language (e.g. CSS3 powerful selectors). A direct consequence is a waste of CPU that is required to display web pages, as well as the significant amount of useless traffic at web scale. Style sheets are designed to operate on a set of documents (possibly generated). However, existing techniques consist in syntax validators, optimizers and runtime debuggers that operate in one particular document instance. As such, they do not provide guarantees concerning all web pages in CSS refactoring, such as preservation of the formatting. This is partly because they are essentially syntactic and do not take advantage of CSS semantics to detect redundancies. We propose a set of automated refactoring techniques aimed at removing redundant and inaccessible declarations and rules, without affecting the layout of any document to which the style sheet is applied. We implemented a prototype that has been extensively tested with popular web sites (such as Google Sites, CNN, Apple, etc.). We show that significant size reduction can be obtained while preserving the code readability and improving maintainability.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Relationship between The Moral Reasoning Ability And leadership Style of Nursing Managers of Medical Centers in Jiroft

The health system needs nursing managers with moral reasoning ability to increase the quality of care in the system by adopting an effective leadership style. The aim of this study was to investigate the relationship between moral reasoning ability and leadership style of nursing managers of medical centers affiliated to Jiroft University of Medical Sciences. The present study was a descriptive...

متن کامل

Synthesizing di erent development paradigms : Combining top - down with bottom - up reasoning about distributedsystems 1

Our goal is the presentation of a uniform framework for compositional reasoning about the development of distributed processes and data structures.This framework should be a synthesis because, depending on the structure of the processes involved and the veriication steps required, diierent formalisms are most suitable for carrying out one's reasoning. We illustrate this uniform framework by pre...

متن کامل

Analogical Reasoning, Defeasible Reasoning, and the Reference Class

This paper attempts four things. It demonstrates the possibility of accounting for Russell-style and Clark-style analogical reasoning in an existing framework for statistical reasoning. It critically reviews the proposals made by Clark for defeasible analogical reasoning and shows how they can be understood better simply as defeasible reasoning. It argues that generalization from the single cas...

متن کامل

Temporal Reasoning for Procedural Programs

While temporal verification of programs is a topic with a long history, its traditional basis—semantics based on word languages—is ill-suited for modular reasoning about procedural programs. We address this issue by defining the semantics of procedural (potentially recursive) programs using languages of nested words and developing a framework for temporal reasoning around it. This generalizatio...

متن کامل

Ayahuasca as Antidepressant? Psychedelics and Styles of Reasoning in Psychiatry

There is a growing interest among scientists and the lay public alike in using the South American psychedelic brew, ayahuasca, to treat psychiatric disorders like depression and anxiety. Such a practice is controversial due to a style of reasoning within conventional psychiatry that sees psychedelic-induced modified states of consciousness as pathological. This article analyzes the academic lit...

متن کامل

Towards Reasoning About Properties of Imperative Programs using Linear Logic

In this paper we propose an approach to reasoning about properties of imperative programs. We assume in this context that the meanings of program constructs are described using rules in the natural semantics style with the additional observation that these rules may involve the treatment of state. Our approach involves modeling natural semantics style rules within a logic and then reasoning abo...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015